package com.sino.operation.commons.util;

/**
 * @Title: Exec_Util
 * @Description: 集中记账交易工具类
 * @Author dengls
 * @date 2021/9/22 16:52
 */
public class Exec_Util {
    /**
     * 金额加点方法
     *
     * @param amount
     * @return
     */
    public static String addPoint(String amount) {
        if (null == amount || "".equals(amount)) {
            return "";
        } else {
            if (!amount.contains(".")) {
                return amount + ".00";
            } else {
                String reg = "^[0-9]+(.[0-9]{1})?$";
                if (amount.matches(reg)) {
                    return amount + "0";
                } else {
                    return amount;
                }
            }
        }
    }
}
